import { defineStore } from 'pinia';
import { visualizingMasterInterface } from './interface';

export const useVisualizingMasterStore = defineStore('visualizingMaster', {
  state: (): visualizingMasterInterface => ({
    MonthOutputProductionDate: [],
    MonthOutputToTalCount: [],
    MonthOutputQualifiedCount: [],
    MonthOutputUnqualifiedCount: [],
    MonthOutputQualifiedRate: [],
    MonthOutputUnqualifiedRate: [],
  }),
  actions: {
    updateMonthOutput(data:visualizingMasterInterface) {
      this.MonthOutputProductionDate = data.MonthOutputProductionDate;
      this.MonthOutputToTalCount = data.MonthOutputToTalCount;
      this.MonthOutputQualifiedCount = data.MonthOutputQualifiedCount;
      this.MonthOutputUnqualifiedCount = data.MonthOutputUnqualifiedCount;
      this.MonthOutputQualifiedRate = data.MonthOutputQualifiedRate;
      this.MonthOutputUnqualifiedRate = data.MonthOutputUnqualifiedRate;
      
    }
  }
})